using System.Data.Entity.ModelConfiguration;
using SailHero.Soft.FrameWork.Models;

namespace SailHero.Soft.FrameWork.Mapping.AuthCodeDB
{
    public class Sys_SoftWareMap : EntityTypeConfiguration<Sys_SoftWare>
    {
        public Sys_SoftWareMap()
        {
            // Primary Key
            this.HasKey(t => t.ID);

            // Properties
            this.Property(t => t.ID)
                .IsRequired()
                .HasMaxLength(50);

            this.Property(t => t.SoftNo)
                .HasMaxLength(50);

            this.Property(t => t.SoftCName)
                .IsRequired()
                .HasMaxLength(30);

            this.Property(t => t.SoftEName)
                .HasMaxLength(30);

            this.Property(t => t.PartentID)
                .HasMaxLength(50);

            this.Property(t => t.SoftManager)
                .HasMaxLength(50);

            this.Property(t => t.Telephone)
                .HasMaxLength(50);

            this.Property(t => t.Fax)
                .HasMaxLength(50);

            this.Property(t => t.Remark)
                .HasMaxLength(100);

            this.Property(t => t.Creator)
                .HasMaxLength(50);

            this.Property(t => t.UpdateUser)
                .HasMaxLength(50);

            this.Property(t => t.DownloadPath)
                .HasMaxLength(500);

            // Table & Column Mappings
            this.ToTable("Sys_SoftWare");
            this.Property(t => t.ID).HasColumnName("ID");
            this.Property(t => t.SoftNo).HasColumnName("SoftNo");
            this.Property(t => t.SoftCName).HasColumnName("SoftCName");
            this.Property(t => t.SoftEName).HasColumnName("SoftEName");
            this.Property(t => t.PartentID).HasColumnName("PartentID");
            this.Property(t => t.SoftManager).HasColumnName("SoftManager");
            this.Property(t => t.Telephone).HasColumnName("Telephone");
            this.Property(t => t.Fax).HasColumnName("Fax");
            this.Property(t => t.OrderNum).HasColumnName("OrderNum");
            this.Property(t => t.IsEnable).HasColumnName("IsEnable");
            this.Property(t => t.Remark).HasColumnName("Remark");
            this.Property(t => t.Creator).HasColumnName("Creator");
            this.Property(t => t.CreateDate).HasColumnName("CreateDate");
            this.Property(t => t.UpdateUser).HasColumnName("UpdateUser");
            this.Property(t => t.UpdateDate).HasColumnName("UpdateDate");
            this.Property(t => t.DownloadPath).HasColumnName("DownloadPath");
        }
    }
}
